<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>鑫立方管理系统</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/common.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/main.css" />
<script type="text/javascript" src="<%=basePath%>js/libs/modernizr.min.js"></script>
<script type="text/javascript" src="<%=basePath%>My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath%>js/jquery-1.10.2.min.js"></script>
<style type="text/css">
.textarea {
	height: 50px;
	width: 1000px;
}
</style>
<script type="text/javascript">
	function selectbatch(value) {

		var now = new Date();
		var year = now.getFullYear(); //年
		var month = now.getMonth() + 1; //月
		var day = now.getDate(); //日
		var curentTime = year + "-" + month + "-" + day;
		$("#pscaleTime").val(curentTime);
		$("#pdeliverTime").val(curentTime);

	}
	$(function() {
		var x = 10;
		var y = 20;
		$("a.tooltip")
				.mouseover(
						function(e) {
							this.myTitle = this.title;
							this.title = "";
							var imgTitle = this.myTitle ? "<br />"
									+ this.myTitle + " 产品预览图" : "";
							var tooltip = "<div id='tooltip'><img src='" + this.href + "' alt='' width='200' height='200' />"
									+ imgTitle + "</div>";
							$("body").append(tooltip);
							$("#tooltip").css({
								"top" : (e.pageY + y) + "px",
								"left" : (e.pageX + x) + "px"
							}).show("fast");
						}).mouseout(function(e) {
					this.title = this.myTitle;
					$("#tooltip").remove();
				}).mousemove(function(e) {
					$("#tooltip").css({
						"top" : (e.pageY + y) + "px",
						"left" : (e.pageX + x) + "px"
					});
				});
	})
</script>
<style>
/* ul{margin: 30px auto; width:1440px;}
ul li{float: left; padding-right: 20px; list-style: none;}
ul li img{width: 77px; height: 57px; padding: 6px; border: 1px solid #ccc; background-color:#eee; -webkit-border-radius: 8px;}
*/
#tooltip {
	position: absolute;
	background-color: #eee;
	border: 1px solid #999;
	width: 200px;
	height: 200px;
	-webkit-border-radius: 8px;
	font-family: "微软雅黑";
	padding: 20px;
}
</style>
</head>
<body>
  <div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
      <div class="topbar-logo-wrap clearfix">
        <ul class="navbar-list clearfix">
          <li><a class="on" href="#">鑫立方管理系统</a>
          </li>
        </ul>
      </div>
      <div class="top-info-wrap">
        <ul class="top-info-list clearfix">
          <li><a href="/user/logout">退出</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
  <div class="container clearfix">
    <div class="sidebar-wrap">
      <div class="sidebar-content">
        <ul class="sidebar-list">
          <li><a href="#"><i class="icon-font">&#xe003;</i>厂家</a>
            <ul class="sub-menu">


              <li><a href="<%=basePath + "factory/search"%>"><i class="icon-font">&#xe006;</i>商品管理</a>
              </li>

              <li><a href="<%=basePath + "factory/ordersearch"%>"><i class="icon-font">&#xe006;</i>订单确认</a>
              </li>
            </ul></li>
        </ul>
      </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">
      <div class="crumb-wrap">
        <div class="crumb-list">
          <i class="icon-font"></i><a href="/factory/index">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">订单管理</span>
        </div>
      </div>
      <div class="result-wrap">
        <form action="/factory/ordersave" method="post">
          <div class="config-items">
            <div class="config-title">
              <h1>
                <i class="icon-font">&#xe00a;</i>客户信息
              </h1>
            </div>
            <input type="hidden" name="orderitem.i_id" value="${orderitem.i_id }" />
            <div class="result-content">
              <table width="100%" class="insert-tab">
                <tbody>
                  <tr>
                    <th width="15%"><i class="require-red">*</i>订单编号：</th>
                    <td><input type="text" size="35" name="orderitem.o_id" value="${orderitem.o_id}" class="common-text" readonly></td>
                    <th><i class="require-red">*</i>订单日期：</th>
                    <td><input class="common-text" readonly type="text" size="35" name="orderitem.createTime"
                      value="<fmt:formatDate value='${orderitem.createTime}' type='date' pattern="yyyy-MM-dd" />" /></td>
                  </tr>

                  <tr>
                    <th><i class="require-red">*</i>姓名：</th>
                    <td><input type="text" size="35" name="orderitem.custerName" value="${orderitem.custerName}" class="common-text" readonly></td>
                    <th><i class="require-red">*</i>电话：</th>
                    <td><input type="text" size="35" name="orderitem.custerTel" value="${orderitem.custerTel}" class="common-text" readonly></td>
                  </tr>

                  <tr>
                    <th><i class="require-red">*</i>地址：</th>
                    <td><input type="text" size="35" name="orderitem.custerAddress" value="${orderitem.custerAddress}" class="common-text" readonly></td>

                  </tr>

                </tbody>
              </table>
            </div>
          </div>


          <div class="config-items">
            <div class="config-title">
              <h1>
                <i class="icon-font">&#xe014;</i>订单明细
              </h1>
            </div>
            <div class="result-content">
              <table width="100%" class="insert-tab">
                <tr>
                  <th>图片</th>
                  <th>品牌</th>
                  <th>型号</th>
                  <th>规格</th>
                  <th>材质</th>
                  <th>单位</th>
                  <th>数量</th>
                  <th>使用位置</th>
                  <th>备注</th>
                  <th>量尺时间</th>
                  <th>送货时间</th>


                </tr>
                <c:forEach items="${pageRecord.list }" var="o" varStatus="s">
                  <tr>
                    <input type="hidden" name="o.i_id" value="${o.i_id }" />
                    <td><a href="<%=basePath%>upload/${o.pic }" title="" class="tooltip"><img src="<%=basePath%>upload/${o.pic }" border="0" width="36px;" height="36px;" /> </a>
                    </td>
                    <td>${o.brand}</td>
                    <td>${o.type }</td>
                    <td>${o.spec}</td>
                    <td>${o.material}</td>
                    <td>${o.unit}</td>
                    <td>${o.count}</td>
                    <td>${o.location}</td>
                    <td>${o.itemRemark}</td>
                    <td><input class="common-text" size="10" name="scaleTime" value="${o.scaleTime}" type="text" onClick="WdatePicker()" placeholder="请点击选择时间" /></td>
                    <td><input class="common-text" size="10" name="deliverTime" value="${o.deliverTime}" type="text" onClick="WdatePicker()" placeholder="请点击选择时间" /></td>
                  </tr>
                </c:forEach>
              </table>
            </div>
          </div>

          <div class="config-items">
            <div class="config-title">
              <h1>
                <i class="icon-font">&#xe00a;</i>补充说明
              </h1>
            </div>
            <div class="result-content">
              <input type="text" class="textarea" name="buchong" value="${buchong}" readonly="readonly"></input>
            </div>
          </div>
          <div class="config-items" align="left">
            <td><input type="checkbox" name="batch" id="batch" onclick="selectbatch(this)">批量确认</input> <input class="common-text" size="10" name="pscaleTime" id="pscaleTime"
              value="${o.pscaleTime}" type="text" onClick="WdatePicker()" placeholder="请点击选择时间" /> <input class="common-text" size="10" name="pdeliverTime" id="pdeliverTime" value="${o.pdeliverTime}"
              type="text" onClick="WdatePicker()" placeholder="请点击选择时间" /> &nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" value="提交" class="btn btn-primary btn6 mr10"> <input type="button"
              value="返回" onclick="history.go(-1)" class="btn btn6">
            </td>
          </div>
        </form>
      </div>
    </div>
    <!--/main-->
  </div>
</body>
</html>